package admincow.servlet.raza;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import admincow.dao.RazaDAO;
import admincow.vo.RazaVO;

/**
 * Servlet implementation class for Servlet: RazaEditarServlet
 *
 */
 public class RazaEditarServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
   static final long serialVersionUID = 1L;

	public RazaEditarServlet() {
		super();
	}   	
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		 RazaDAO dao= new RazaDAO();
		 int id=Integer.parseInt(request.getParameter("idRaza"));
		 RazaVO vo= dao.obtenerRazaPorId(id);
		 request.setAttribute("Raza", vo);
		request.getRequestDispatcher("razaEditar.jsp").forward(request,
				response);
	}  	
	
	/* (non-Java-doc)
	 * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		//ProductoDAO dao = new ProductoDAO();
		//int id = Integer.parseInt(request.getParameter("idProducto"));
		//dao.obtenerProductoPorId(id);
	}   	  	    
}